package cn.tedu._06springaop.egaop;

import org.springframework.stereotype.Component;

@Component
public class CartServiceImpl implements CartService {
    @Override
    public boolean addCart(String cartDetail) {
        System.out.println("方法内部：" + cartDetail);
        if ("1".equals(cartDetail)) {
            System.out.println();
            throw new RuntimeException("未知错误！！！");
        } else if ("2".equals(cartDetail)) {
            return false;
        }
        return true;
    }
}
